Many conventional optical character readers (OCRs) can reliably read machine-printed text if the text is printed cleanly and the page layout is relatively free of clutter. However, OCR performance is often degraded significantly by noisy images and poor print quality. One significant kind of noise is background texture, such as random speckle. For example, we have encountered especially severe noise problems in cases where the addresses on postal items were binarized for electronic transmission. Commercial OCR systems are unable to process such noisy images effectively. As a consequence, a large percentage of the mail stream has to be sorted manually even when OCR processing is used.
Often an image of a text page contains graphical elements that make an automatic analysis more difficult or prevent it completely. For example, often text is written in tables where the rows and columns are separated by lines. Often these line touch or cross the text, due to poor alignment of the writing. With lines crossing the text, it becomes very difficult to separate the text into individual characters and hence automatic processing becomes unreliable. The invention provides a technique to distinguish between different shapes and hence to distinguish which pixels belong to text and which to other graphical elements such as thin lines. In this way, thin lines can be identified and removed from the image before an OCR system is attempting to read it.
Numerous filtering techniques have been described for improving the quality of images. These techniques are described, for example, in the following publications, which are hereby incorporated by reference: A. Rosenfeld and A.C. Kak, Digital Picture Processing, Vols. 1 and 2, Academic Press, Orlando, 1982; A. N. Netravalli and B. C. Haskell, Digital Pictures, Plenum Press, New York, 1988; Henk J. A. M. Heijmans, Morphological Image Operators, Academic Press, Boston, 1994; I. Pitas and A.. Venetsanopoulos, Nonlinear Digital Filters, Kluwer Academic Publishers, Boston, 1990; and W. K. Pratt, Digital Image Processing, John Wiley & Sons, Ne York, 1991.
For example, techniques such as bandpass filtering can be used to suppress noise. However, these techniques are global in the sense that they treat every pan of the image in the same way. They are not adapting to suppress the kind of noise having a locally averaged level that varies from place to place over the image. Such variations may include, for example, variations in background level, image darkness, and damage, as well as variations in background texture. Other techniques, such as morphological operations (see, e.g., Henk J.A.M. Heijmans, "Morphological Image Operators, " cited above) are often used to reduce the level of noise. However morphological operations simply remove all image elements that are smaller than a certain size. Often the noise is comparable in size or larger than the characters or graphical elements of interest and hence these techniques do not provide the desired effect.
Other techniques are based on simple image parameters. An exemplary technique of this kind eliminates connected components of specified sizes. However, a parameter-based technique may not be robust enough to perform as well as is desired for at least some practical applications. One such application is the recognition of characters formed by dot-matrix printers. Each of the dots that make up such a character will, in some cases, be commensurate with the surrounding noise speckles. In such a case, robust discrimination can only be achieved by testing a neighborhood comparable in size to a character. Only in such a case can a confident judgment be made whether a given pixel belongs to the character, or to the noisy background.
One way to extract information about an input image is to convolve it with a convolution kernel. When several kernels are used in this way, logical operations or arithmetic operations can be used to assemble cumulative information from the respective convolution operations.
For example, a method for edge detection that uses a pair of complementary convolution kemels is described in B. R. Meijer, "Rules and algorithms for the design of templates for template matching,"Proc. 11th IAPR Int. Conf. on Pattern Recognition, Vol. 1, Conf. A: Computer Vision and Applications, IEEE Computer Society Press, Los Alamitos, Calif. (1992) 760-763. This method detects image contours by using binary multiplication (the AND operation) to combine the output of a kernel that, e.g., detects a given pixel only when it is black, with the output of a kernel that detects neighbors of a given pixel only when they are white. This method is of limited use for enhancing noisy or complex images, because it only deals with edge information, and does not incorporate any detailed knowledge of the shape information that is expected to be present.